package com.xbongbong.pro.statistic.enums;

import com.xbongbong.i18n.util.I18nMessageUtil;
import lombok.Getter;

/**
 * 图表发布到首页的枚举
 *
 * @author 徐俊杰
 * @version v1.0
 * @date 2019/5/6 17:01
 * @since v1.0
 */
@Getter
public enum ChartPublishEnum {
    /**
     * 未发送到首页
     */
    NOT_PUBLISH(0, "enum.chartPublish.name.not_publish"),
    /**
     * 已发送到首页
     */
    PUBLISH(1, "enum.chartPublish.name.publish"),
    /**
     * 不能发送到首页
     */
    CANNOT_PUBLISH(2, "enum.chartPublish.name.cannot_publish"),
    ;
    private int code;
    private String name;

    ChartPublishEnum(int code, String name) {
        this.code = code;
        this.name = name;
    }

    public String getName() {
        return I18nMessageUtil.getMessage(name);
    }
}
